package thread;

public class LambdaDemo {
    public static void main(String[] args) {
        Shops shops = new Shops();
        Runnable r = new Runnable() {
            @Override
            public void run() {
                shops.buy();
            }
        };
        Runnable r1 = ()-> shops.buy();
        Runnable r2 = shops::buy;

        /*Thread t = new Thread(r2);
        t.start();*/
        new Thread(shops::buy).start();
        Runnable r3 = new Runnable() {
            @Override
            public void run() {
                Shops.doSome();
            }
        };

        new Thread(Shops::doSome).start();



    }
}
class Shops{
    public static void doSome(){
        System.out.println("zuo");
    }
    public void buy(){
        System.out.println("mai");
    }
}
